Skip to content

lib: use msgspec json decoder for requests Session - #24894

Open
BeryJu wants to merge 1 commit into
mainfrom
lib/http/requests-json-msgspec
Open

lib: use msgspec json decoder for requests Session #24894
BeryJu wants to merge 1 commit into
mainfrom
lib/http/requests-json-msgspec

Conversation

@BeryJu

@BeryJu BeryJu commented Aug 7, 2026

Copy link
Copy Markdown
Member

the last one

@BeryJu
BeryJu requested a review from a team as a code owner August 7, 2026 22:42
@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit dce5a72
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a78bf2369c8f900082eea58
😎 Deploy Preview https://deploy-preview-24894--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.43%. Comparing base (977716e) to head (50ec153).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24894      +/-   ##
==========================================
+ Coverage   91.41%   91.43%   +0.01%     
==========================================
  Files        1146     1147       +1     
  Lines       71815    71873      +58     
  Branches     3875     3875              
==========================================
+ Hits        65653    65718      +65     
+ Misses       6127     6120       -7     
  Partials       35       35              
Flag Coverage Δ
conformance 34.85% <32.20%> (-0.01%) ⬇️
e2e 39.56% <37.28%> (+<0.01%) ⬆️
integration 31.40% <27.11%> (-0.01%) ⬇️
rust 38.89% <ø> (ø)
unit 93.08% <100.00%> (+<0.01%) ⬆️
unit-migrate 93.11% <100.00%> (+10.44%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@BeryJu BeryJu changed the title lib: use msgspec decoder for requests Session lib: use msgspec json decoder for requests Session Aug 7, 2026
@BeryJu
BeryJu force-pushed the lib/http/requests-json-msgspec branch from dba51a9 to 4449b43 Compare August 7, 2026 23:41
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-50ec153a5881eacfb464f2fb71b708ee2f9a70e2
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-50ec153a5881eacfb464f2fb71b708ee2f9a70e2

Afterwards, run the upgrade commands from the latest release notes.

@BeryJu
BeryJu force-pushed the lib/evaluator/lazy-session branch from dc0249c to 44ed01c Compare August 8, 2026 12:41
@BeryJu
BeryJu force-pushed the lib/http/requests-json-msgspec branch from 4449b43 to 47aa3a6 Compare August 8, 2026 12:41
@BeryJu
BeryJu force-pushed the lib/evaluator/lazy-session branch from 44ed01c to 217f373 Compare August 9, 2026 16:37
@BeryJu
BeryJu changed the base branch from lib/evaluator/lazy-session to main August 9, 2026 16:39
@BeryJu
BeryJu force-pushed the lib/http/requests-json-msgspec branch 3 times, most recently from 1e0370a to a423dcb Compare August 9, 2026 17:01
@netlify

netlify Bot commented Aug 9, 2026

Copy link
Copy Markdown

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit dce5a72
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a78bf2307db5900080f0ff2
😎 Deploy Preview https://deploy-preview-24894--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@BeryJu
BeryJu force-pushed the lib/http/requests-json-msgspec branch from a423dcb to dce5a72 Compare August 9, 2026 17:55
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@BeryJu
BeryJu force-pushed the lib/http/requests-json-msgspec branch from dce5a72 to 50ec153 Compare August 9, 2026 18:03

@rissson rissson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small testing thing, otherwise LGTM

session = get_http_session()
self.assertIsInstance(session, DebugSession)
self.assertIsInstance(session.get_adapter("https://goauthentik.io"), MsgspecHTTPAdapter)
self.assertIsInstance(session.get_adapter("http://goauthentik.io"), MsgspecHTTPAdapter)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any way we could add a test to ensure that the msgspec decoder is used by default? So that in future requests versions, if they start passing args to the json method, we can catch that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants